#include				"Human.hpp"
#include				"Goban.hpp"
#include				<iostream>

Human::Human(Goban &goban, std::string const &stonePath, Arbitre &arbitre)
	: _goban(goban), _squareMap(goban.getSquareMap()), _arbitre(arbitre)
{
	_stonePath = stonePath;
	_deadStone = 0;
}

Human::~Human()
{
}

void					Human::putStone(int key)
{
	int					ret;
	
	ret = _arbitre.check(key, _goban.getSquareInfo(key), _deadStone, (((_stonePath) == (BLACK_STONE_PATH)) ? false : true));
	_squareMap[key]->putStone(_stonePath);
}

void					Human::removeStone(int key)
{
	_squareMap[key]->removeStone();
}

int					Human::getDeadStone() const
{
	return (this->_deadStone);
}